<?php
namespace Core;

require_once __Dir__ . '/../../simpletest/autorun.php';

class TestOfDeleteTask extends \UnitTestCase 
{
	/*
	* Check a correct add answer
	*/
    function testCorrectDeleteTask() 
	{
		$services = new CoreService();
		$tasksResponse = $services->getAllTasks();
		$id = $tasksResponse->response[0]->Id;
		
		$account = $services->deleteTask($id);
		$this->assertTrue($account->isFailed == false);
    }
	
	
	/*
	* Check an invalid add answer
	*/
    function testInvalidDeleteTaskByTaskNotFound() 
	{
		$services = new CoreService();
		$account = $services->deleteTask(-1);
		$this->assertTrue($account->isFailed);
    }
}
?>